<?php
    if(!empty($contract_files)){
        $fileArray = array();
        echo $this->Form->create("Payee", array('url' => 'print_contract/' . $this->request->data['Payee']['id']));
        foreach ($contract_files as $key => $contracts) {
            $fileArray[$key] = ' '.$contracts;
        } 
        echo $this->Form->input('Payee.selected_file', array(
                    'before' => '<div>',
                    'after' => '</div>',
                    'separator' => '<div></div>',
                    'legend' => __('SELECT_CONTRACT', true),
                    'type' => 'radio', 
                    'options' => $fileArray,
                    'value' => key($fileArray)
                ));
        ?>
        <div style="margin-top: 10px;"></div><?php
        echo $this->Form->submit(__('DOWNLOAD_CONTRACT'),
            array(
                'class' => 'button',
                'div' => false,
            )
        );?><div class="buttonEnding"></div><?php
        echo $this->Form->end();
    }
?>